<div>
    <div class="breadcrumb">
        <a class="prev" onclick="history.go(-1)"></a>
        <a class="next" onclick="history.go(1)"></a>
    </div>
    <div class="tab-title">
        {{'classify.listTitle'|translate}}
        <a routerLink="/basicSetting/classifyAdd">{{'classify.add'|translate}}</a>
    </div>
    <nz-table class="medical-table" #columnTable [nzSize]='small' [nzTotal]="page.pages" [nzPageIndex]="page.pageNo" nzPageSize="10" (nzPageIndexChange)="changeCurrentPage($event)" [nzFrontPagination]="false" [nzLoading]="tableLoading"
        [nzData]="dataList">
        <thead>
            <tr>
                <th nzWidth="100px" nzAlign="center">{{'classify.id'|translate}}</th>
                <th nzWidth="150px" nzAlign="center">{{'classify.name'|translate}}</th>
                <th nzWidth="150px" nzAlign="center">{{'classify.providerType'|translate}}</th>
                <th nzAlign="center">{{'classify.displayPriority'|translate}}</th>
                <th nzAlign="center">{{'cz.title'|translate}}</th>
            </tr>
        </thead>
        <tbody>
            <tr *ngFor="let data of columnTable.data">
                <td nzWidth="100px" nzAlign="center">{{ data.id }}</td>
                <td nzWidth="150px" nzAlign="center">{{ data.name }}</td>
                <td nzWidth="150px" nzAlign="center">
                    <span *ngIf="data.providerType ==='OTHER'">/</span>
                    <span *ngIf="data.providerType ==='AGENCY'">{{'providerType.agency'|translate}}</span>
                    <span *ngIf="data.providerType ==='GUIDE'">{{'providerType.guide'|translate}}</span>
                </td>
                <td nzAlign="center">{{ data.displayPriority }}</td>
                <td nzAlign="center">
					<a *ngIf="data.mode === 'ALL'" (click)="updateNumber(data)">{{'classify.editPriority'|translate}}</a>
					<a routerLink="/basicSetting/classifyAdd" *ngIf="data.mode !== 'ALL'" [queryParams]="{ id : data.id}">{{'cz.edit'|translate}}</a>
					<a *ngIf="data.mode !== 'ALL'" (click)="delete(data)">{{'cz.delete'|translate}}</a>
				</td>
            </tr>
        </tbody>
    </nz-table>
    <nz-modal [(nzVisible)]="isVisible" [nzMaskClosable]="false" nzTitle="{{'classify.edit'|translate}}" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" [nzOkLoading]="isOkLoading">
        <form>
            <nz-form-item>
                <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="name">{{'classify.name'|translate}}</nz-form-label>
                <nz-form-control [nzSm]="14" [nzXs]="24">
                    {{selectedRowData.name}}
                </nz-form-control>
            </nz-form-item>
            <nz-form-item>
                <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="name">{{'classify.displayPriority'|translate}}</nz-form-label>
                <nz-form-control [nzSm]="14" [nzXs]="24">
                    <input nz-input [(ngModel)]="selectedRowData.displayPriority" name="displayPriority" placeholder="{{'classify.displayPriorityP'|translate}}" />
                </nz-form-control>
            </nz-form-item>
        </form>
    </nz-modal>
</div>